{include file="/common/_meta"}
</head>
<body>
{include file="/common/top"}

<div class="main-container container-fluid">
    <div class="page-container">
        <!-- Page Sidebar -->
       {include file="/common/list"}
        <!-- Page Content -->
        <div class="page-content">

            <!-- Page Breadcrumb -->
            <div class="page-breadcrumbs">
                <ul class="breadcrumb">
                   <li>
                        <a href="#">系统</a>
                    </li>
                    <li>
                        <a href="{:url('cate/lst')}">分类管理</a>
                    </li>
                    <li class="active">添加分类</li>
                </ul>
            </div>
            <!-- /Page Breadcrumb -->

            <!-- Page Body -->
            <div class="page-body">
                <form action="" method="post">
                <button type="button" tooltip="添加分类" class="btn btn-sm btn-azure btn-addon" onClick="javascript:window.location.href = '{:url('cate/add')}'"> <i class="fa fa-plus"></i>新增栏目
                </button>
                <button type="button" tooltip="添加分类" class="btn btn-sm btn-azure btn-addon" onClick="javascript:window.location.href = '{:url('cate/add')}'">批量删除
                </button>
                <button type="submit" tooltip="添加分类" class="btn btn-sm btn-azure btn-addon" >更新排序
                </button>
                <div class="row">
                    <div class="col-lg-12 col-sm-12 col-xs-12">
                        <div class="widget">
                            <div class="widget-body">
                                <div class="flip-scroll">
                                    <table class="table table-bordered table-hover">
                                        <thead class="">
                                            <tr>
                                                <th class="text-center" width="4%">分类ID</th>
                                                <th class="text-center">分类名称</th>
                                                <th class="text-center" width="6%">分类类型</th>
                                                <th class="text-center">关键词</th>
                                                <th class="text-center">描述</th>
                                                <th class="text-center">排序</th>
                                                <th class="text-center">状态</th>
                                                <th class="text-center">操作</th>
                                            </tr>
                                        </thead>
                                        {volist name="catelist" id="cate"}
                                        <tbody>
                                            <tr>
                                                <td align="center">{$cate.cate_id}</td>
                                                <td><?php echo str_repeat('-',$cate['lever']*8)?>{$cate.cate_name}</td>
                                                <td align="center">
                                                {if condition="$cate['cate_type'] eq 1"}
                                                系统分类
                                                {elseif condition="$cate['cate_type'] eq 2"}
                                                帮助分类
                                                {elseif condition="$cate['cate_type'] eq 3"}
                                                网店帮助
                                                {elseif condition="$cate['cate_type'] eq 4"}
                                                网店信息
                                                {elseif condition="$cate['cate_type'] eq 5"}
                                                普通分类
                                                {/if}

                                                </td>
                                                <td>{$cate.cate_keywords}</td>
                                                <td>{$cate.cate_description}</td>
                                                <td width="4%" align="center"><input type="text" style="width: 30px; text-align: center;" name="cate_sort[{$cate.cate_id}]" value="{$cate.cate_sort}"></td>
                                                <td align="center">
                                                {if condition="$cate['cate_shownav'] eq 1"}
                                                    显示
                                                {else /}
                                                    禁用
                                                {/if}
                                               

                                                </td>
                                                <td align="center">
                                                    <a href="{:url('edit',array('cate_id'=>$cate['cate_id']))}" class="btn btn-primary btn-sm shiny">
                                                        <i class="fa fa-edit"></i> 编辑
                                                    </a>
                                                    {notin name="$cate['cate_pid']" value="1"}
                                                    <a href="#" onClick="warning('确实要删除吗', '{:url('del',array('cate_id'=>$cate['cate_id']))}')" class="btn btn-danger btn-sm shiny">
                                                        <i class="fa fa-trash-o"></i> 删除
                                                    </a>
                                                    {else/}
                                                    <a href="#" disabled="disabled" class="btn btn-danger btn-sm shiny">
                                                        <i class="fa fa-trash-o"></i> 删除
                                                    </a>
                                                    {/notin}
                                                </td>
                                            </tr>
                                        </tbody>
                                        {/volist}
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                </form>
            </div>
            <!-- /Page Body -->
        </div>
        <!-- /Page Content -->
	</div>	
</div>

{include file="common/_footer"}
</body>
</html>